
#include <stdio.h>
#include <stdlib.h>

void squeeze(char s[])
{
  int i, j;

  for (i = j = 1; s[i] != '\0'; i++)
    if (s[i] != s[j-1])
      s[j++] = s[i];
  s[j] = '\0';
}

int main()
{
  char s[] = "abcaabbbccccdddd";

  squeeze(s);
  printf("%s\n", s);

  return 0;
}
